<?php

use Illuminate\Database\Seeder;
use App\Package\Attendance\Time;
use Illuminate\Support\Facades\DB;

class StationSettingTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$stations = DB::table('stations')->get();

    	$times = Time::nodes();

		$settings = [];

    	foreach ($stations as $station) {
    		foreach ($times as $time) {
				$settings[] = [
					'project_id' => 1,
					'station_id' => $station->id,
					'genre_id' => 1,
					'time' => $time,
					'delayed' => 10,
					'created_at' => date('Y-m-d'),
					'updated_at' => date('Y-m-d')
				];
			}
		}

		DB::table('report_setting')->insert($settings);
    }
}
